Fix allocation of phys_to_machine_mapping array during
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 21 Oct 2005 15:22:09 +0000 (16:22 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 21 Oct 2005 15:22:09 +0000 (16:22 +0100)
x86/64 linux boot. The original builder-provided array
must be made read-only in the initial mapping.
Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c

index 6f9ab86b7980a9b73bcfbd9ce670bbfa0172b90c..c4f0999d32e9022e85607ed1c154b1fc5619bcc3 100644 (file)
@@ -519,7 +519,7 @@ void __init setup_memory_region(void)
        e820_print_map(who);
 }
 
-#else  /* CONFIX_XEN */
+#else  /* CONFIG_XEN */
 
 extern unsigned long xen_override_max_pfn;
 extern union xen_start_info_union xen_start_info_union;
index 19f5e957a55756785b7262bc672e413112ea3e83..9c51a4f270061ea72f05940eeec9623044fd9888 100644 (file)
@@ -733,6 +733,7 @@ void __init setup_arch(char **cmdline_p)
 #ifdef CONFIG_XEN
        {
                int i, j, k, fpp;
+
                /* Make sure we have a large enough P->M table. */
                phys_to_machine_mapping = alloc_bootmem(
                        end_pfn * sizeof(unsigned long));
@@ -745,6 +746,9 @@ void __init setup_arch(char **cmdline_p)
                        __pa(xen_start_info->mfn_list), 
                        PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
                                        sizeof(unsigned long))));
+               make_pages_readonly((void *)xen_start_info->mfn_list,
+                                   PFN_UP(xen_start_info->nr_pages *
+                                          sizeof(unsigned long)));
 
                /* 
                 * Initialise the list of the frames that specify the list of